import request from "@/utils/serviceApiH2";

/* 企业管理 */

// 企业风采列表查询
export function corporateStyleApi(params) {
  return request({
    url: "/apiH2/admin/company/all/companyImgList",
    method: "GET",
    params,
  });
}

// 企业列表查询
export function companyListApi(data) {
  return request({
    url: "/apiH2/admin/company/all/companyList",
    method: "POST",
    data,
  });
}

// 根据id删除企业风采
export function delEleganceByIdApi(id) {
  return request({
    url: `/apiH2/admin/company/elegance/delEleganceById/${id}`,
    method: "DELETE",
  });
}

// 根据id审核企业风采
export function updateAuditByIdApi(params) {
  return request({
    url: `/apiH2/admin/company/elegance/updateAuditById/${params.id}/${params.audit}`,
    method: "PUT",
  });
}

// 根据ids审核企业风采
export function updateAuditByIdsApi(data) {
  return request({
    url: `/apiH2/admin/company/elegance/updateAuditByIds`,
    method: "PUT",
    data
  });
}

// 修改企业图标
export function updateCompanyLogoApi(data, id) {
  return request({
    url: `/apiH2/admin/company/updateCompanyLogo/${id}`,
    method: "PUT",
    data,
  });
}

// 企业在招职位列表查询
export function positionListApi(params) {
  return request({
    url: "/apiH2/admin/company/positionList",
    method: "GET",
    params,
  });
}

// 收到简历列表查询
export function receivedResumeListApi(params) {
  return request({
    url: "/apiH2/admin/company/receivedResumeList",
    method: "GET",
    params,
  });
}

// 根据cid查询简历下载列表查询
export function downResumeListApi(params) {
  return request({
    url: `/apiH2/admin/company/downResumeList/${params.cid}`,
    method: "GET",
    params: {
      page: params.page,
      pageSize: params.pageSize,
    },
  });
}

// 根据uid查询近期查看
export function viewRecordISawItApi(params) {
  return request({
    url: `/apiH2/admin/company/viewRecord/iSawIt/${params.uid}`,
    method: "GET",
    params: {
      page: params.page,
      pagesize: params.pagesize,
    },
  });
}

// 根据uid查询职位被查看
export function viewRecorLookAtMedApi(params) {
  return request({
    url: `/apiH2/admin/company/viewRecord/lookAtMe/${params.uid}`,
    method: "GET",
    params: {
      page: params.page,
      pagesize: params.pagesize,
    },
  });
}

// 根据id查询认证状态
export function selCompanyAuditByIdApi(id) {
  return request({
    url: `/apiH2/admin/company/selCompanyAuditById/${id}`,
    method: "GET",
  });
}

// 批量审核认证状态
export function updateCompanyAuditApi(data) {
  return request({
    url: `/apiH2/admin/company/updateCompanyAudit`,
    method: "PUT",
    data,
  });
}

// 批量修改显示状态
export function updateCompanyDisplayApi(data) {
  return request({
    url: "/apiH2/admin/company/updateCompanyDisplay",
    method: "PUT",
    data,
  });
}

// 批量刷新职位
export function updateCompanyRefJobApi(data) {
  return request({
    url: "/apiH2/admin/company/updateCompanyRefJob",
    method: "PUT",
    data,
  });
}

// 查询企业联系人列表
export function selCompanyContentListApi(uid) {
  return request({
    url: `/apiH2/admin/company/selCompanyContentList/${uid}`,
    method: "GET",
  });
}

// 根据uid查询企业登录日志
export function selLoginLogApi(params) {
  return request({
    url: `/apiH2/admin/company/selLoginLog/${params.uid}`,
    method: "GET",
    params: {
      page: params.page,
      pagesize: params.pagesize,
    },
  });
}

// 根据uid查询客户详情
export function selMemberByUIdApi(uid) {
  return request({
    url: `/apiH2/admin/company/selMemberByUId/${uid}`,
    method: "GET",
  });
}

// 根据uid查询企业操作日志
export function selOperateByUIdApi(params) {
  return request({
    url: `/apiH2/admin/company/selOperateByUId/${params.uid}`,
    method: "GET",
    params: {
      page: params.page,
      pagesize: params.pagesize,
    },
  });
}

// 根据id审核认证状态
export function updateCompanyAuditByIdApi(params) {
  return request({
    url: `/apiH2/admin/company/updateCompanyAuditById`,
    method: "PUT",
    params,
  });
}

// 批量修改审核状态
export function updateAuditApi(data) {
  return request({
    url: `/apiH2/admin/job/updateAudit`,
    method: "PUT",
    data,
  });
}

// 企业根据ids删除职位
export function delPositionByIdsApi(data) {
  return request({
    url: `/apiH2/admin/job/delPositionByIds`,
    method: "PUT",
    data,
  });
}

// 企业性质查询
export function selCategoryNatureListApi() {
  return request({
    url: "/apiH2/member/company/manage/selCategoryNatureList",
    method:'GET'
  });
}

// 企业规模查询
export function selCategoryScaleListApi() {
  return request({
    url: "/apiH2/member/company/manage/selCategoryScaleList",
    method: "GET",
  });
}

// 根据id修改企业资料
export function updateCompanyByIdApi(data) {
  return request({
    url: "/apiH2/admin/company/updateCompanyById",
    method: "PUT",
    data
  });
}

/* 金刚区 */

// 新增服务
export function addServeApi() {
  return request({
    url: `/apiH2/admin/content/serve/addServe`,
    method: "POST",
  });
}

// 删除页面信息
export function delTopByIdApi() {
  return request({
    url: `/apiH2/admin/content/serve/delTopById/{id}`,
    method: "DELETE",
  });
}

// 服务列表查询
export function selServeListApi() {
  return request({
    url: `/apiH2/admin/content/serve/selServeList`,
    method: "GET",
  });
}

// 查询顶部服务信息
export function selTopByIdApi() {
  return request({
    url: `/apiH2/admin/content/serve/selTopById/{id}`,
    method: "GET",
  });
}

// 修改服务信息
export function updateServeByIdApi() {
  return request({
    url: `/apiH2/admin/content/serve/updateServeById/{id}`,
    method: "PUT",
  });
}

// 修改顶部服务序号
export function updateServeSNApi() {
  return request({
    url: `/apiH2/admin/content/serve/updateServeSN`,
    method: "PUT",
  });
}

/* 会员管理 */

// 会员列表查询
export function memberListApi(params) {
  return request({
    url: "/apiH2/admin/member/all/memberList",
    method: "GET",
    params,
  });
}

// 批量删除会员信息
export function delMemberApi(data) {
  return request({
    url: `/apiH2/admin/member/deleteMemberByUIds`,
    method: "DELETE",
    data,
  });
}

// 修改会员详情
export function editMemberDetailApi(params) {
  return request({
    url: `/apiH2/admin/member/updateMemberByUId/${params.uid}`,
    method: "PUT",
    params: {
      mobile: params.mobile,
      username: params.username,
      password: params.password,
    },
  });
}

// 修改会员状态
export function editMemberStatusApi(uid) {
  return request({
    url: `/apiH2/admin/member/updateMemberStatusByUId/${uid}`,
    method: "PUT",
  });
}

/* 个人简历管理 */

// 简历页面
export function resumeListApi(data) {
  return request({
    url: "/apiH2/admin/resume/all/resumeMessageList",
    method: "POST",
    data,
  });
}

// 新增跟进记录
export function addFollowUpApi(data) {
  return request({
    url: "/apiH2/admin/resume/addFollowUp",
    method: "POST",
    data,
  });
}

// 投递记录列表查询
export function jobApplyListApi(params) {
  return request({
    url: "/apiH2/admin/resume/all/jobApplyMessageList",
    method: "GET",
    params,
  });
}

// 删除简历
export function delResumeApi(data) {
  return request({
    url: `/apiH2/admin/resume/delResumeByIds`,
    method: "DELETE",
    data
  });
}

// 链接查询
export function selLinkByUidApi() {
  return request({
    url: `/apiH2/admin/resume/selLinkByUid/${type}/${id}`,
    method: "GET",
  });
}

// 批量审核状态
export function updateAuditByUidApi(data) {
  return request({
    url: `/apiH2/admin/resume/updateAudit`,
    method: "PUT",
    data,
  });
}

// 管理所属行业查询
export function selCategoryTradeListApi() {
  return request({
    url: "/apiH2/member/company/manage/selCategoryTradeList",
    method: "GET",
  });
}

// 管理工作地区查询
export function selCategoryDistrictListApi() {
  return request({
    url: "/apiH2/member/company/position/selCategoryDistrictList",
    method: "GET",
  });
}

// 管理职位类型查询
export function selCategoryJobListApi() {
  return request({
    url: "/apiH2/member/company/position/selCategoryJobList",
    method: "GET",
  });
}

// 个人简历详情
export function selResumeDetailsByIdApi(id) {
  return request({
    url:`/apiH2/admin/resume/selResumeDetailsById/${id}`,
    method:'GET'
  })
}

// 根据uid查询主动投递
export function selDeliverByUIdApi(uid) {
  return request({
    url: `/apiH2/admin/resume/selDeliverByUId/${uid}`,
    method:'GET'
  });
}

// 根据uid查询收到面邀
export function selInviteByUIdApi(uid) {
  return request({
    url: `/apiH2/admin/resume/selInviteByUId/${uid}`,
    method: "GET",
  });
}

// 根据uid查询用户登录日志
export function selPersonLoginLogApi(params) {
  return request({
    url: `/apiH2/admin/resume/selLoginLog/${params.uid}`,
    method: "GET",
    params: {
      page: params.page,
      pagesize: params.pagesize,
    },
  });
}

// 根据uid查询会员详情
export function selMemberPersonByUIdApi(uid) {
  return request({
    url: `/apiH2/admin/resume/selMemberByUId/${uid}`,
    method: "GET",
  });
}

// 根据uid查询用户操作日志
export function selOperatePersonByUIdApi(params) {
  return request({
    url: `/apiH2/admin/resume/selOperateByUId/${params.uid}`,
    method: "GET",
    params: {
      page: params.page,
      pagesize: params.pagesize,
    },
  });
}

// 根据uid查询浏览记录
export function selDeliverPersonByUIdApi(uid) {
  return request({
    url: `/apiH2/admin/resume/selRecordByUId/${uid}`,
    method: "GET",
  });
}

// 个人简历详情查询
export function selResumePersonDetailsByIdApi(id) {
  return request({
    url: `/apiH2/admin/resume/selResumeDetailsById/${id}`,
    method: "GET",
  });
}

// 根据uid查询被查看
export function selViewedPersonByUIdApi(uid) {
  return request({
    url: `/apiH2/admin/resume/selViewedByUId/${uid}`,
    method:'GET'
  });
}


/* 职位列表查询 */

// 职位页面
export function jobListApi(params) {
  return request({
    url: "/apiH2/admin/job/all/jobList",
    method: "GET",
    params,
  });
}

// 职位面试列表
export function selJobInterviewListApi(params) {
  return request({
    url: "/apiH2/admin/job/all/selJobInterviewList",
    method: "GET",
    params,
  });
}

// 根据id修改企业职位
export function updatePositionByIdApi(params,id) {
  return request({
    url: `/apiH2/admin/job/updatePositionById/${id}`,
    method:'PUT',
    params
  });
}

// 简历下载列表
export function selResumeDownListApi(params) {
  return request({
    url: "/apiH2/admin/job/all/selResumeDownList",
    method: "GET",
    params,
  });
}

// 修改显示状态
export function updateDisplayByIdApi(params) {
  return request({
    url: `/apiH2/admin/job/updateDisplayById/${params.id}`,
    method: "PUT",
    // data: {
    //   display:params.display
    // }
    params: {
      display: params.display,
    },
  });
}

// 修改审核状态
export function updateAuditByIdAuditApi(params) {
  return request({
    url: `/apiH2/admin/job/updateAuditById/${params.id}`,
    method: "PUT",
    params: {
      audit: params.audit,
    },
  });
}

// 根据uid获取企业token
export function selTokenByUIdApi(uid) {
  return request({
    url: `/apiH2/admin/company/selTokenByUId/${uid}`,
    method: "GET",
  });
}

// 企业根据id删除职位
export function delPositionByIdApi(id) {
  return request({
    url: `/apiH2/admin/job/delPositionById/${id}`,
    method: "PUT",
  });
}

// 标签列表查询
export function selTagListApi() {
  return request({
    url: "/apiH2/member/company/position/all/selTagList",
    method:'GET'
  });
}

/* 用户建议 */

// 删除投诉建议
export function delProposalByIdsApi() {
  return request({
    url: `/apiH2/admin/proposal/delProposalByIds`,
    method: "DELETE",
  });
}

// 投诉建议列表查询
export function selProposalListApi() {
  return request({
    url: `/apiH2/admin/proposal/selProposalList`,
    method: "GET",
  });
}

// 处理投诉建议
export function updateStatusByIdsApi() {
  return request({
    url: `/apiH2/admin/proposal/updateStatusByIds`,
    method: "PUT",
  });
}

// 企业职位信息导出
export function exportExcelApi() {
  return request({
    url: "/apiH2/admin/excel/exportExcel",
    method:'POST'
  });
}
